package com.iplant.ams.service.po.ipt;

import com.fasterxml.jackson.annotation.JsonProperty;
import com.iplant.base.po.BasePO;
import com.iplant.base.po.enums.DBSchemas;
import com.iplant.base.utils.annotation.po.DBBasePO;
import com.iplant.base.utils.annotation.field.DBField;

import java.io.Serializable;
import java.util.ArrayList;
import java.util.Calendar;
import java.util.List;

@DBBasePO(TableName = "ipt_recorditem", CheckName = {"Code"}, Name = false, CodeAuto = true,
        CodePrefix = "DPC-{yyyyMM}-", Schemas = DBSchemas.AMS)
public class IPTRecordItem extends BasePO implements Serializable {
    /**
     * 序列号
     */
    private static final long serialVersionUID = 1L;

    /**
    * 项目ID  保存  维修为0
    **/
    @DBField
    public int ItemID = 0;

    /**
    * 产线ID  保存
    **/
    @DBField
    public int LineID = 0;
    /**
    * 产线名称
    **/
    public String LineName = "";

    /**
    * 首巡检中为工序 点检为设备 维护为设备   保存
    **/
    @DBField
    public int MainID = 0;
    /**
    * 首巡检中为工序 点检为设备 维保为设备    保存
    **/
    public String MainName = "";
    /**
    * 首巡检中为工序 点检为设备 维保为设备型号  
    **/
    public String MainCode = "";

    /**
    * 检验项点类型  1首巡检 2点检 3维护   保存
    **/
    @DBField
    public int IPTType = 0;
    public String IPTTypeName = "";

    /**
    * 检验模式类型   （点检： 1日常  2专业 ）   保存
    **/
    @DBField
    public int ModeType = 0;
    public String ModeTypeName = "";

    /**
    * 检验项目   保存    （维修中 维修人数）
    **/
    public String GroupName = "";

    /**
    * 项目明细   保存  （维修中 更换硬件）
    **/
    public String ItemName = "";

    /**
    * 描述      保存
    **/
    @DBField
    public String Description = "";

    /**
    * 产品ID  保存
    **/
    @DBField
    public int ProductID = 0;
    public String ProductNo = "";
    public String ProductName = "";

    public List<Integer> Repairmans = new ArrayList<>();

    public String RepairmanNames = "";

    /**
    * 订单ID 首巡检需要赋值
    **/
    @DBField
    public int OrderID = 0;

    public String OrderNo = "";

    /**
    * 计划日期  在维护中生效
    **/
    @DBField
    public Calendar PlanTime = Calendar.getInstance();

    /**
    * 任务状态  1为待执行  2为已关闭
    **/
    @DBField
    public int Status = 1;

    public List<IPTRecordItemValue> ItemResult = new ArrayList<>();

    @JsonProperty("ItemID")
    public int getItemID() {
        return ItemID;
    }

    public void setItemID(int itemID) {
        ItemID = itemID;
    }

    @JsonProperty("LineID")
    public int getLineID() {
        return LineID;
    }

    public void setLineID(int lineID) {
        LineID = lineID;
    }

    @JsonProperty("LineName")
    public String getLineName() {
        return LineName;
    }

    public void setLineName(String lineName) {
        LineName = lineName;
    }

    @JsonProperty("MainID")
    public int getMainID() {
        return MainID;
    }

    public void setMainID(int mainID) {
        MainID = mainID;
    }

    @JsonProperty("MainName")
    public String getMainName() {
        return MainName;
    }

    public void setMainName(String mainName) {
        MainName = mainName;
    }

    @JsonProperty("MainCode")
    public String getMainCode() {
        return MainCode;
    }

    public void setMainCode(String mainCode) {
        MainCode = mainCode;
    }

    @JsonProperty("IPTType")
    public int getIPTType() {
        return IPTType;
    }

    public void setIPTType(int IPTType) {
        this.IPTType = IPTType;
    }

    @JsonProperty("IPTTypeName")
    public String getIPTTypeName() {
        return IPTTypeName;
    }

    public void setIPTTypeName(String IPTTypeName) {
        this.IPTTypeName = IPTTypeName;
    }

    @JsonProperty("ModeType")
    public int getModeType() {
        return ModeType;
    }

    public void setModeType(int modeType) {
        ModeType = modeType;
    }

    @JsonProperty("ModeTypeName")
    public String getModeTypeName() {
        return ModeTypeName;
    }

    public void setModeTypeName(String modeTypeName) {
        ModeTypeName = modeTypeName;
    }

    @JsonProperty("GroupName")
    public String getGroupName() {
        return GroupName;
    }

    public void setGroupName(String groupName) {
        GroupName = groupName;
    }

    @JsonProperty("ItemName")
    public String getItemName() {
        return ItemName;
    }

    public void setItemName(String itemName) {
        ItemName = itemName;
    }

    @Override
    @JsonProperty("Description")
    public String getDescription() {
        return Description;
    }

    @Override
    public void setDescription(String description) {
        Description = description;
    }

    @JsonProperty("ProductID")
    public int getProductID() {
        return ProductID;
    }

    public void setProductID(int productID) {
        ProductID = productID;
    }

    @JsonProperty("ProductNo")
    public String getProductNo() {
        return ProductNo;
    }

    public void setProductNo(String productNo) {
        ProductNo = productNo;
    }

    @JsonProperty("ProductName")
    public String getProductName() {
        return ProductName;
    }

    public void setProductName(String productName) {
        ProductName = productName;
    }

    @JsonProperty("Repairmans")
    public List<Integer> getRepairmans() {
        return Repairmans;
    }

    public void setRepairmans(List<Integer> repairmans) {
        Repairmans = repairmans;
    }

    @JsonProperty("RepairmanNames")
    public String getRepairmanNames() {
        return RepairmanNames;
    }

    public void setRepairmanNames(String repairmanNames) {
        RepairmanNames = repairmanNames;
    }

    @JsonProperty("OrderID")
    public int getOrderID() {
        return OrderID;
    }

    public void setOrderID(int orderID) {
        OrderID = orderID;
    }

    @JsonProperty("OrderNo")
    public String getOrderNo() {
        return OrderNo;
    }

    public void setOrderNo(String orderNo) {
        OrderNo = orderNo;
    }

    @JsonProperty("PlanTime")
    public Calendar getPlanTime() {
        return PlanTime;
    }

    public void setPlanTime(Calendar planTime) {
        PlanTime = planTime;
    }

    @JsonProperty("Status")
    public int getStatus() {
        return Status;
    }

    public void setStatus(int status) {
        Status = status;
    }

    @JsonProperty("ItemResult")
    public List<IPTRecordItemValue> getItemResult() {
        return ItemResult;
    }

    public void setItemResult(List<IPTRecordItemValue> itemResult) {
        ItemResult = itemResult;
    }
}
